/*Author: Omri Lavi
 * ID: 305019325
 */

package run;

import java.beans.XMLEncoder;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;

import view.CLI;
import view.GUI;
import view.UI;
import controller.Controller;
import controller.MyController;
import model.Config;
import model.FlightGearModel;
import model.Model;

public class Run {

	public static void main(String[] args) throws Exception{
		UI cli = new CLI();
		Model flightGear = new FlightGearModel();
		Controller controller = new MyController();
		
		controller.setModel(flightGear);
		controller.setView(cli);
		
		flightGear.setController(controller);
		cli.setController(controller);
		cli.startUI();
		
	
		flightGear.loadConfig("Config.xml");
		flightGear.startModel();
		
	}
		
}
